<style lang="stylus" scoped>
.box1, .box2 {
  width: 100%;
  min-height: 900px;

  .text1 {
    display: inline-block;
    width: 100%;
    float: left;
    background: #fcb72e;
    z-index: 2;
  }

  .text2 {
    display: inline-block;
    float: left;
    background: #fcb72e;
    padding: 20px 20px;
    z-index: 0;
  }

  .text3 {
    display: inline-block;
    float: left;
    background: #fde72f;
    padding: 0px 20px 30px 20px;
    z-index: 0;
    margin-bottom: 70px;
  }

  .text5 {
    display: inline-block;
    width: 50%;
    float: left;
    padding: 0px 30px 30px 30px;
  }

  .btn {
    position: absolute;
    font-size: 2rem;
    font-weight: 600;
    border-radius: 15px;
    color: #000;
    width: 70%;
    background: #fef636;
    top: 36%;
    margin: 0 15%;
  }

  .box2 {
    display: inline-block;
    background: #000;
  }

  img {
    display: inline-block;
    width: 100%;
  }
}
</style>
<template>
  <div class="partner">
    <div v-show="!ispartner" class="box1">

        <i-button type="warning" class="btn" @click="payCreate">购买合伙人</i-button>

      <img class="text1" src="./imgs/bg7.png" alt="">
      <img class="text2" src="./imgs/bg8.png" alt="">
      <img  class="text3" src="./imgs/bg9.png" alt="">
    </div>
    <div v-show="ispartner" class="box2">
      <img class="text4" src="./imgs/bg10.png" alt="">
      <router-link to="/banka1">
        <img class="text5" src="./imgs/1.png" alt="">
      </router-link>
      <router-link to="/Qrcode">
        <img class="text5" src="./imgs/2.png" alt="">
      </router-link>
      <img class="text2" src="./imgs/bg8.png" alt="">
      <img  class="text3" src="./imgs/bg9.png" alt="">
    </div>
  </div>
</template>
<script>
import axios from "axios";
export default {
  name: "Partner",
  data() {
    return {
      ispartner: this.$store.state.user.level > 0 ? true : false
    };
  },
 mounted () {
    // if(!this.$store.state.show){
    //   this.$router.push({path: '/'});
    // }
  },
  methods: {
    payCreate(){
      if(this.$store.state.user.openId){
        window.location.href="/pay/create?openId="+this.$store.state.user.openId
      }else{
        alert("您必须使用微信登录才能完成支付");
        window.location.href="/wechat/getOpenId"
      }

    }
  }
};
</script>


